package com.bjsdzk.collector.entity.agreement;

import lombok.Getter;
import lombok.Setter;

public class CallBackCmd {
    @Setter
    @Getter
    private long time;
    @Setter
    @Getter
    private boolean success =false ;
    @Setter
    @Getter
    private boolean callbackPlatForm =true ;
    @Setter
    @Getter
    private int status ;
    @Setter
    @Getter
    private String source ;
    @Setter
    @Getter
    private String messageId ;
    @Setter
    @Getter
    private String cmd;
    @Setter
    @Getter
    private String cmdPK  ;
    @Setter
    @Getter
    private String deviceHex ;
    @Setter
    @Getter
    private int port ;
    @Setter
    @Getter
    private String callBackCmd ;
    @Setter
    @Getter
    private Object data;
    @Setter
    @Getter
    private boolean isSave=true;
    @Setter
    @Getter
    private boolean online;
    @Setter
    @Getter
    private Integer deviceAddr;

    public CallBackCmd() {
    }

    public CallBackCmd(boolean success, String source, String messageId, String cmd, String cmdPK, String deviceHex, int port) {
        this.success = success;
        this.source = source;
        this.messageId = messageId;
        this.cmd = cmd;
        this.cmdPK = cmdPK;
        this.deviceHex = deviceHex;
        this.port = port;
    }


    @Override
    public String toString() {
        return "CallBackCmd{" +
                "time=" + time +
                ", success=" + success +
                ", status=" + status +
                ", source='" + source + '\'' +
                ", messageId='" + messageId + '\'' +
                ", cmd='" + cmd + '\'' +
                ", cmdPK='" + cmdPK + '\'' +
                ", deviceHex='" + deviceHex + '\'' +
                ", port=" + port +
                ", callBackCmd='" + callBackCmd + '\'' +
                ", data='" + data + '\'' +
                ", isSave=" + isSave +
                '}';
    }
}
